package com.scsj.supermarket.view.fragment.myordermodel;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.scsj.supermarket.R;
import com.scsj.supermarket.adapter.InterFlowAdapter;
import com.scsj.supermarket.bean.InterFlowBean;
import com.scsj.supermarket.view.fragment.basemodel.BaseFragment;
import java.util.ArrayList;
import java.util.List;

/**
 * 物流列表,配送状态，退款状态，提现状态
 */
public class InterFlowFragment extends BaseFragment {

    private RecyclerView flow_rv;
    private List<InterFlowBean> flowBeans;
    private InterFlowAdapter adapter;


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View inflate = inflater.inflate(R.layout.fragment_inter_flow, null);

        initView(inflate, null);
        initListener();
        initData();

        return inflate;
    }

    @Override
    protected void initView(View view, Bundle savedInstanceState) {

        flow_rv = view.findViewById(R.id.flow_rv);
        flow_rv.setLayoutManager(new LinearLayoutManager(getHoldingActivity()));
        flow_rv.setNestedScrollingEnabled(false);
    }

    @Override
    protected void initListener() {
    }

    @Override
    protected void initData() {

        flowBeans = new ArrayList<>();
        flowBeans.add(new InterFlowBean("您的订单在郑州市已经签收，请联系快递西欧阿各哥，电话41543","201-11-12 10:20:20",0));
        flowBeans.add(new InterFlowBean("您的订单在郑州市已经签收，请联系快递西欧阿各哥，电话41543","201-11-12 10:20:20",0));
        flowBeans.add(new InterFlowBean("您的订单在郑州市已经签收，请联系快递西欧阿各哥，电话41543","201-11-12 10:20:20",0));
        flowBeans.add(new InterFlowBean("您的订单在郑州市已经签收，请联系快递西欧阿各哥，电话41543","201-11-12 10:20:20",0));
        flowBeans.add(new InterFlowBean("您的订单在郑州市已经签收，请联系快递西欧阿各哥，电话41543","201-11-12 10:20:20",0));
        flowBeans.add(new InterFlowBean("您的订单在郑州市已经签收，请联系快递西欧阿各哥，电话41543","201-11-12 10:20:20",0));
        flowBeans.add(new InterFlowBean("您的订单在郑州市已经签收，请联系快递西欧阿各哥，电话41543","201-11-12 10:20:20",0));
        flowBeans.add(new InterFlowBean("您的订单在郑州市已经签收，请联系快递西欧阿各哥，电话41543","201-11-12 10:20:20",0));
        flowBeans.add(new InterFlowBean("您的订单在郑州市已经签收，请联系快递西欧阿各哥，电话41543","201-11-12 10:20:20",0));
        flowBeans.add(new InterFlowBean("您的订单在郑州市已经签收，请联系快递西欧阿各哥，电话41543","201-11-12 10:20:20",0));
        flowBeans.add(new InterFlowBean("您的订单在郑州市已经签收，请联系快递西欧阿各哥，电话41543","201-11-12 10:20:20",0));
        flowBeans.add(new InterFlowBean("您的订单在郑州市已经签收，请联系快递西欧阿各哥，电话41543","201-11-12 10:20:20",0));

        adapter = new InterFlowAdapter(flowBeans);
        flow_rv.setAdapter(adapter);

    }
    public void setData(){
        System.out.println("fsdfafafdsafasd");
    }

    @Override
    protected int getLayoutId() {
        return 0;
    }
}
